/**
 * Copyright (C) 2012 The SkyTvOS Project
 * <p/>
 * Version     Date           Author
 * ─────────────────────────────────────
 * 2014年12月29日         luwei
 */

package com.coocaa.launcher.sidebar.setting.item.custom;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.KeyEvent;
import android.view.View;

import com.coocaa.launcher.framework.sidebar.item.Item;
import com.coocaa.launcher.framework.sidebar.item.ItemView;
import com.coocaa.x.framework.utils.LogUtils;
import com.tianci.appstore.AppStoreActivity;

public class Custom extends Item {
    public Custom(Context context) {
        super(context);
    }

    @Override
    public void onItemFocusChange(View v, boolean focus) {
        // TODO Auto-generated method stub
        super.onItemFocusChange(v, focus);
    }

    @Override
    public boolean onItemKeyEvent(View v, int keycode, KeyEvent keyEvent) {
        return false;
    }

    @Override
    public void onItemClick(View v) {
        Intent intent = new Intent(mContext, AppStoreActivity.class);

        try {
            mContext.startActivity(intent);
        } catch (Exception e) {
            LogUtils.i("" + e);
        }
        super.onItemClick(v);
    }

    @Override
    public ItemView createItemView() {
        // TODO Auto-generated method stub
        return new CustomItem(mContext);
    }
}
